<!--
 * @Author: 胡海
 * @Date: 2020-11-22 16:32:44
 * @LastEditors: 胡海
 * @LastEditTime: 2020-11-22 16:36:16
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>双向数据绑定</title>
    <script src="../vue/src/vue.js"></script>
</head>
<body>
    
	<div id="app">
		<input v-model="message"  />
		{{message}}
	</div>
    <script>
			
        /*
            v-model:在表单元素上创建双向数据绑定

                数据 -> view
                view -> 数据

        */

        var message = 'hello';

        var vm = new Vue({
            el: '#app',
            data:{
                message
            }
        })

    </script>

</body>
</html>